home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Snippets / Sound / Cheap Studio / _headers / SimpleApp_Sound.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-15  |  2.6 KB  |  95 lines  |  [TEXT/CWIE]

  1. /*
  2. **    Apple Macintosh Developer Technical Support
  3. **
  4. **    Header for SimpleQT functions using SimpleApp framework.
  5. **
  6. **    by Mark Cookson, Apple Developer Technical Support
  7. **
  8. **    File:    SimpleApp_Sound.h
  9. **
  10. **    Copyright ©1996 Apple Computer, Inc.
  11. **    All rights reserved.
  12. **
  13. **    You may incorporate this sample code into your applications without
  14. **    restriction, though the sample code has been provided "AS IS" and the
  15. **    responsibility for its operation is 100% yours.  However, what you are
  16. **    not permitted to do is to redistribute the source as "Apple Sample
  17. **    Code" after having made changes. If you're going to re-distribute the
  18. **    source, we require that you make it clear in the source that the code
  19. **    was descended from Apple Sample Code, but that you've made changes.
  20. */
  21.  
  22. #include    <Windows.h>
  23.  
  24. #include    "SimpleApp.h"
  25. #include    "DBFF.h"
  26.  
  27. #define    oneBuffer                (1)
  28. #define    tenBuffers                (10)
  29. #define    soundPlaying            (!ASoundIsDone (mySoundInfo) && !paused)
  30. #define    qtStyle                    0
  31. #define    cdStyle                    1
  32. #define kScrollMinValue            1
  33.  
  34. /* Globals */
  35. ControlHandle            playButton1        = nil,
  36.                         playButton2        = nil,
  37.                         playButton3        = nil,
  38.                         playButton4        = nil,
  39.                         playButton5        = nil,
  40.                         playButton6        = nil,
  41.                         playAllButton    = nil,
  42.                         muteCheck1        = nil,
  43.                         muteCheck2        = nil,
  44.                         muteCheck3        = nil,
  45.                         muteCheck4        = nil,
  46.                         muteCheck5        = nil,
  47.                         muteCheck6        = nil,
  48.                         recordButton    = nil;
  49. Boolean                    gDone            = false,
  50.                         sound1Set        = false,
  51.                         sound2Set        = false,
  52.                         sound3Set        = false,
  53.                         sound4Set        = false,
  54.                         sound5Set        = false,
  55.                         sound6Set        = false,
  56.                         sound1Playing    = false,
  57.                         sound2Playing    = false,
  58.                         sound3Playing    = false,
  59.                         sound4Playing    = false,
  60.                         sound5Playing    = false,
  61.                         sound6Playing    = false,
  62.                         playAll            = false,
  63.                         prepairedToRecord = false,
  64.                         recording        = false,
  65.                         karakoe            = false;
  66. SoundInfoPtr            mySoundInfo1    = nil,
  67.                         mySoundInfo2    = nil,
  68.                         mySoundInfo3    = nil,
  69.                         mySoundInfo4    = nil,
  70.                         mySoundInfo5    = nil,
  71.                         mySoundInfo6    = nil;
  72. GrafPtr                    gTheWindow        = nil;
  73. short                    soundsToSync    = 0;
  74.  
  75. /* Function declarations */
  76.         short    DoPlay1            (void);
  77.         short    DoPlay2            (void);
  78.         short    DoPlay3            (void);
  79.         short    DoPlay4            (void);
  80.         short    DoPlay5            (void);
  81.         short    DoPlay6            (void);
  82.         short    DoPlayAll        (void);
  83.         OSErr    MuteSound1        (void);
  84.         OSErr    MuteSound2        (void);
  85.         OSErr    MuteSound3        (void);
  86.         OSErr    MuteSound4        (void);
  87.         OSErr    MuteSound5        (void);
  88.         OSErr    MuteSound6        (void);
  89.         short    DoRecord        (void);
  90.         pascal    OSErr    ClearAllSounds    (long menuResult);
  91.         void    MyIdleProc        (EventRecord *evt);
  92.         void    main            (void);
  93.         void    EnableControl    (ControlRef cr);
  94.         void     DisableControl    (ControlRef cr);
  95.